package collection;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/3/2
 **/
public class CollectionDemo {
    public static void main(String[] args) {
        Collection c = new ArrayList<>();
        c.add(new Point(1,2));
        c.add(new Point(3,2));
        c.add(new Point(6,1));
        c.add(new Point(1,25));
        c.add(new Point(5,2));
        c.add(new Point(1,9));
        c.add(new Point(6,8));
        c.add(new Point(1,2));
        System.out.println(c);
        Point p = new Point(1,2);
        boolean contains=c.contains(p);
        System.out.println(contains);
        c.remove(p);//删除元素  equals
        System.out.println(c);
        Collection cc= new ArrayList<>();
        Point pp = new Point();
        cc.add(pp);
        System.out.println(pp);
        System.out.println(cc);
        pp.setX(100);
        System.out.println(pp);
        System.out.println(cc);








        /*
        Collection o = new ArrayList();
        o.add("one");
        o.add("teo");
        o.add("three");
        o.add("four");
        o.add("five");
        System.out.println(o);
        System.out.println("size:"+o.size());
        System.out.println("是否为空集:"+ o.isEmpty());
        o.clear();//清空集合;

         */


    }
}
